home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume15 / cshar / patch2 < prev    next >
Encoding:
Internet Message Format  |  1988-06-02  |  3.9 KB

  1. Subject:  v15i035:  Tools to create and unpack shell archives, Patch2
  2. Newsgroups: comp.sources.unix,comp.sources.bugs
  3. Summary: This is an official patch for cshar 2.0; please apply it.
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Rich $alz <rsalz@bbn.com>
  7. Posting-number: Volume 15, Issue 35
  8. Archive-name: cshar/patch2
  9.  
  10.  
  11. Description:
  12.     From: Bob Mitchell <kid@right.cs.washington.edu>
  13.     +Unshar doesn't properly cd to the specified directory, leaving
  14.      unpacked files in the directory it was started from.
  15.  
  16. Fix:
  17.     To aid in robustness, patches are not shipped "raw"; I apologize for
  18.     the inconvenience.  Save this message and unshar it; from rn, say
  19.     "|unshar -d DIR", where DIR is your cshar source directory.  Outside
  20.     of rn, say "cd DIR; unshar <thisarticle".  This will create a file
  21.     called patch01, which you can then feed to the patch program.
  22.  
  23.     If you don't have the patch program, make the changes by hand, or get
  24.     patch.
  25.  
  26.     If patch indicates that patchlevel is the wrong version, you may need
  27.     to apply one or more previous patches, or the patch may already have
  28.     been applied.  See the patchlevel.h file to find out what has or has
  29.     not been applied.  In any event, don't continue with the patch.
  30.  
  31.     If any patches are missing, they can be obtained from your nearest
  32.     comp.sources.unix archive.
  33.  
  34. #! /bin/sh
  35. # This is a shell archive.  Remove anything before this line, then unpack
  36. # it by saving it into a file and typing "sh file".  To overwrite existing
  37. # files, type "sh file -c".  You can also feed this as standard input via
  38. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  39. # will see the following message at the end:
  40. #        "End of shell archive."
  41. # Contents:  patch02
  42. # Wrapped by rsalz@fig.bbn.com on Fri Jun  3 16:11:05 1988
  43. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  44. if test -f 'patch02' -a "${1}" != "-c" ; then 
  45.   echo shar: Will not clobber existing file \"'patch02'\"
  46. else
  47. echo shar: Extracting \"'patch02'\" \(1748 characters\)
  48. sed "s/^X//" >'patch02' <<'END_OF_FILE'
  49. Index: patchlevel.h
  50. Prereq: 2.1
  51. X*** /tmp/,RCSt1a26117    Fri Jun  3 16:09:09 1988
  52. X--- patchlevel.h    Fri Jun  3 16:08:46 1988
  53. X***************
  54. X*** 2,7 ****
  55. X--- 2,10 ----
  56. X  **  This file records official patches.  RCS records the edit log.
  57. X  **
  58. X  **  $Log:    patchlevel.h,v $
  59. X+ **  Revision 2.2  88/06/03  16:08:37  rsalz
  60. X+ **  patch02:  Fix order of chdir/mkdir commands for unshar.
  61. X+ **  
  62. X  **  Revision 2.1  88/06/03  12:16:40  rsalz
  63. X  **  patch01:  Add config.x386 and config.sVr3; change "dirent.h" to <dirent.h>
  64. X  **  patch01:  In Makefile, use $(DIRLIB) only in actions, not dependencies;
  65. X***************
  66. X*** 16,19 ****
  67. X  **  Revision 2.0  88/05/27  13:32:13  rsalz
  68. X  **  First comp.sources.unix release
  69. X  */
  70. X! #define PATCHLEVEL 1
  71. X--- 19,22 ----
  72. X  **  Revision 2.0  88/05/27  13:32:13  rsalz
  73. X  **  First comp.sources.unix release
  74. X  */
  75. X! #define PATCHLEVEL 2
  76. X*** /tmp/,RCSt1a26117    Fri Jun  3 16:09:12 1988
  77. X--- unshar.c    Fri Jun  3 16:08:48 1988
  78. X***************
  79. X*** 6,12 ****
  80. X  #include "shar.h"
  81. X  #ifdef    RCSID
  82. X  static char RCS[] =
  83. X!     "$Header: unshar.c,v 2.1 88/06/03 11:39:33 rsalz Exp $";
  84. X  #endif    /* RCSID */
  85. X  
  86. X  
  87. X--- 6,12 ----
  88. X  #include "shar.h"
  89. X  #ifdef    RCSID
  90. X  static char RCS[] =
  91. X!     "$Header: unshar.c,v 2.2 88/06/03 16:08:14 rsalz Exp $";
  92. X  #endif    /* RCSID */
  93. X  
  94. X  
  95. X***************
  96. X*** 338,344 ****
  97. X      }
  98. X  
  99. X      /* Got directory; try to go there.  Only make last component. */
  100. X!     if (chdir(p) < 0 && mkdir(p, 0777) < 0 && chdir(p) < 0)
  101. X          Quit("Cannot chdir nor mkdir desired directory");
  102. X      }
  103. X      else
  104. X--- 338,344 ----
  105. X      }
  106. X  
  107. X      /* Got directory; try to go there.  Only make last component. */
  108. X!     if (chdir(p) < 0 && (mkdir(p, 0777) < 0 || chdir(p) < 0))
  109. X          Quit("Cannot chdir nor mkdir desired directory");
  110. X      }
  111. X      else
  112. END_OF_FILE
  113. if test 1748 -ne `wc -c <'patch02'`; then
  114.     echo shar: \"'patch02'\" unpacked with wrong size!
  115. fi
  116. # end of 'patch02'
  117. fi
  118. echo shar: End of shell archive.
  119. exit 0
  120.